<template>
	<view class="records">
		<view class="title">{{dialogTitle}}</view>
		<image
		  mode="widthFix"
		  class="closeIcon"
		  @click="onHandleClose"
		  src="https://yunkeososyunchuc.bc8t.cn/lianaikongjian/static/records/close.png"
		/>
		<view class="content">
			<image
				class="treasure"
      	src="https://yunkeososyunchuc.bc8t.cn/lianaikongjian/static/fodder/treasure.png"
    	/>
			<view class="friend">
				<div class="item">
					<image
						class="fodder"
						src="https://yunkeososyunchuc.bc8t.cn/lianaikongjian/static/fodder/fodder-1.png"
						mode="widthFix"
					/>
					<text></text>
					<image
					style="width: 100px;height: 50px;"
						@click="shouqu"
						class="button1"
						src="https://yunkeososyunchuc.bc8t.cn/lianaikongjian/static/fodder/get.png"
						mode="widthFix"
					/>
				</div>
				<div class="item">
					<image
						class="fodder"
						src="https://yunkeososyunchuc.bc8t.cn/lianaikongjian/static/fodder/fodder-2.png"
						mode="widthFix"
					/>
					<text></text>
					<image
						class="button1"
						style="width: 100px;height: 50px;"
						src="https://yunkeososyunchuc.bc8t.cn/lianaikongjian/static/fodder/buy.png"
						mode="widthFix"
						@click="onBuyClick"
					/>
				</div>
				<div class="item">
					<image
						class="fodder"
						src="https://yunkeososyunchuc.bc8t.cn/lianaikongjian/static/fodder/fodder-3.png"
						mode="widthFix"
					/>
					<text></text>
					<image
						style="width: 100px;height: 50px;"
						src="https://yunkeososyunchuc.bc8t.cn/lianaikongjian/static/fodder/get.png"
						mode="widthFix"
					/>
				</div>
				<!-- <div class="item">
					<image
						class="fodder"
						:src="require('..https://yunkeososyunchuc.bc8t.cn/lianaikongjian/static/fodder/fodder-1.png')"
						mode="widthFix"
					/>
					<text></text>
					<image
						style="width: 100px;height: 50px;"
						:src="require('..https://yunkeososyunchuc.bc8t.cn/lianaikongjian/static/fodder/other.png')"
						mode="widthFix"
					/>
				</div> -->
			</view>
		</view>
		<buy v-if="dialogShow" class="buy" @onHandleBuyClose="onHandleBuyClose" />
	</view>
</template>
<script>
import buy from './buy.vue';
export default {
	props: {
		dialogTitle: {
			type: String,
			default: ''
		}
	},
	components: {
		buy
	},
	data() {
		return {
			dialogShow: false
		}
	},
	methods: {
		onBuyClick() {
			this.dialogShow = true
		},
		onHandleBuyClose() {
			this.dialogShow = false
		},
		onHandleClose() {
			this.$emit('onCloseClick')
		},
		shouqu(){
			this.$emit('shouqu',true)
		}
	}
}
</script>

<style scoped>
.records {
	background: rgba(250, 250, 250, .5);
	position: relative;
	border-radius: 20rpx;
	padding: 20rpx;
}
.records .title {
	width: 100%;
	height: 120rpx;
	line-height: 120rpx;
	background: url('https://yunkeososyunchuc.bc8t.cn/lianaikongjian/static/records/title-bg.png');
	background-size: 100% 100%;
	border-top-left-radius: 20rpx;
	font-size: 50rpx;
	color: #af5c0b;
	font-weight: 800;
	letter-spacing: 8rpx;
	margin-bottom: 0 !important;
}
.records .closeIcon {
	width: 60rpx;
	height: 60rpx;
	position: absolute;
	top: -10rpx;
	right: -10rpx;
}
.content {
	background: #fff;
	display: flex;
	flex-direction: column;
	align-items: center;
	border: 10rpx solid #ffdd96;
	border-top: none;
	border-bottom-left-radius: 20rpx;
	border-bottom-right-radius: 20rpx;
}
.content .treasure {
	width: 90%;
	height: 300rpx;
	margin: 20rpx 0;
}
.friend {
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
}
.friend .item {
	width: 90%;
	margin: 10rpx 0;
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: #fff4d4;
	border-radius: 20rpx;
	padding: 20rpx;
	box-sizing: border-box;
}
.friend .item image.fodder {
	width: 150rpx;
	height: 100rpx;
}
.friend .item image.button {
	width: 200rpx;
	height: 100rpx;
}
text.tips {
	margin: 20rpx 0;
	font-size: 25rpx;
	color: #70563d;
	font-weight: 600;
}
.buy {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%); 
}
</style>